<include file="__PUBLIC__/header"/>
<div class="page-container">
    <form class="form form-horizontal" id="form" method="post" action="{|U:'add'}">

        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3"><span class="c-red">*</span>标题：</label>
            <div class="formControls col-xs-6 col-sm-6">
                <input type="text" class="input-text" value="" placeholder="用于后台左侧显示的标题" name="title" datatype="*" nullmsg="请填写标题">
            </div>
            <div class="col-xs-3 col-sm-3"></div>
        </div>

        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3">图标：</label>
            <div class="formControls col-xs-6 col-sm-6">
                <input type="text" class="input-text" value="" placeholder="不填先默认为列表图标" name="icon">
            </div>
            <div class="col-xs-3 col-sm-3"></div>
        </div>

        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3"></label>
            <div class="formControls col-xs-6 col-sm-6">
                小图标请到 <a class="c-blue" href="http://h-ui.net/Hui-3.7-Hui-iconfont.shtml" target="_blank" rel="nofollow">http://h-ui.net/Hui-3.7-Hui-iconfont.shtml</a> 复制icon文字，如 <span class="label label-success f-16">&amp;#xf0005;</span>
            </div>
            <div class="col-xs-3 col-sm-3"> </div>
        </div>

        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3">排序：</label>
            <div class="formControls col-xs-6 col-sm-6">
                <input type="text" class="input-text" value="99" placeholder="排序" name="sort" datatype="n" errormsg="只能填写数字">
            </div>
            <div class="col-xs-3 col-sm-3"></div>
        </div>

        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3"><span class="c-red">*</span>链接：</label>
            <div class="formControls col-xs-6 col-sm-6">
                <input type="text" class="input-text" value="" placeholder="URL或者外链,如 Admin/Menu/index" name="url" datatype="*" nullmsg="请填写链接">
            </div>
            <div class="col-xs-3 col-sm-3"></div>
        </div>

        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3">上级菜单：</label>
            <div class="formControls col-xs-6 col-sm-6">
                <div class="select-box">
                    <select name="pid" class="select">
                        <list from="$menus" name="$qz">
                            <option value="{$qz.id}">{$qz._name}</option>
                        </list>
                    </select>
                </div>
            </div>
            <div class="col-xs-3 col-sm-3"></div>
        </div>

        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3">是否隐藏：</label>
            <div class="formControls col-xs-6 col-sm-6 skin-minimal">
                <div class="radio-box">
                    <input type="radio" name="hide" id="status-0" value="1">
                    <label for="status-0">是</label>
                </div>
                <div class="radio-box">
                    <input type="radio" name="hide" id="status-1" value="0">
                    <label for="status-1">否</label>
                </div>
            </div>
            <div class="col-xs-3 col-sm-3"> </div>
        </div>

        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3">仅开发者模式可见：</label>
            <div class="formControls col-xs-6 col-sm-6 skin-minimal">
                <div class="radio-box">
                    <input type="radio" name="is_dev" id="status-0" value="1">
                    <label for="status-0">是</label>
                </div>
                <div class="radio-box">
                    <input type="radio" name="is_dev" id="status-1" value="0">
                    <label for="status-1">否</label>
                </div>
            </div>
            <div class="col-xs-3 col-sm-3"> </div>
        </div>

        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3">备注：</label>
            <div class="formControls col-xs-2 col-sm-6">
                <textarea class="textarea" placeholder="菜单详细说明" name="tip" onkeyup="textarealength(this,100)"></textarea>
                <p class="textarea-numberbar"><em class="textarea-length">0</em>/100</p>
            </div>
            <div class="col-xs-3 col-sm-3"></div>
        </div>

        <div class="row cl">
            <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
                <button type="submit" class="btn btn-primary radius"><i class="iconfont icon-duigou1"></i> 提交</button>
                <button type="button" class="btn btn-default radius ml-20" onClick="layer_close();">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
            </div>
        </div>
    </form>
</div>
<include file="__PUBLIC__/footer"/>
<script>
    $(function () {
        //默认选中
        $("[name='hide'][value='0']").attr("checked",true);
        $("[name='is_dev'][value='0']").attr("checked",true);
        $("[name='pid']").find("[value='0']").attr("selected",true);
        //单选框样式
        $('.skin-minimal input').iCheck({
            checkboxClass: 'icheckbox-blue',
            radioClass: 'iradio-blue',
            increaseArea: '20%'
        });
        //表单提交
        $("#form").Validform({
            tiptype:2,
            ajaxPost:true,
            showAllError:true,
            callback:function(ret){
                ajax_progress(ret);
            }
        });
    })
</script>
</body>
</html>